/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ajjj.kiviq;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ApplicationScoped;

/**
 *
 * @author orjohan
 */
@ManagedBean(name = "DateBean")
@ApplicationScoped
public class DateBean implements Serializable {

    // @ManagedProperty(value="#{Bean.}")
    private Date date;
    private String data;

    public DateBean() {
    }

    public String getCurrentDateTime() {
        date = Calendar.getInstance().getTime();
        //Simpleformat
        return date.toString();
    }

    public String getData() {
        data = getCurrentDateTime();
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }
}
